package com.huayi.website.service;

import com.huayi.website.entity.ProductCategoryEntity;
import com.huayi.website.entity.ProductEntity;
import com.huayi.website.request.GoodsAddVo;
import com.huayi.website.utils.PagingResponse;

import java.util.List;

public interface ProductService {
    List<ProductCategoryEntity> getAllCategoryList();

    /**
     * 添加商品
     * @param goodsAddVo
     * @param userName
     * @return
     */
    Integer addGoods(GoodsAddVo goodsAddVo,String userName);

    /**
     * 添加分类
     * @param title
     * @param detail
     * @param sort
     * @param image
     * @return
     */
    Integer addCategory(Integer categoryId,String title,String detail,Integer sort,String image);
    Integer editGoods(Integer productId,GoodsAddVo editVo,String userName);
    PagingResponse<ProductEntity> getAllList(int pageIndex, int pageSize, String title, Integer categoryId,Integer companyId);
    ProductEntity getDetailById(Integer id);

    /**
     * 获取分类
     * @param id
     * @return
     */
    ProductCategoryEntity getCategoryById(Integer id);
    void deleteGoods(Integer id);
    void deleteCategory(Integer id);
}
